import React from 'react';
import {
  G2,
  Chart,
  Geom,
  Axis,
  Tooltip,
  Coord,
  Label,
  Legend,
  View,
  Guide,
  Shape,
  Facet,
  Util
} from "bizcharts";

const DoubleLineCharts = props => {
  const { x, y, data, useTool = false, style } = props
  return (
    <div style={style}>
      <Chart data={data} forceFit {...props}>
      <Legend />
          <Axis name={x} />
          <Axis
            name={y}
            // label={{
            //   formatter: val => `${val}°C`
            // }}
          />
          <Tooltip
            crosshairs={{
              type: "y"
            }}
          />
          <Geom
            type="line"
            position={`${x}*${y}`}
            size={2}
            color={"type"}
            shape={"smooth"}
          />
          <Geom
            type="point"
            position={`${x}*${y}`}
            size={4}
            shape={"circle"}
            color={"type"}
            style={{
              stroke: "#fff",
              lineWidth: 1
            }}
          />
      </Chart>
    </div>
  );
};

export default DoubleLineCharts;